/**用于选择的区域树*/
function areaShowMenu() {
	var cityObj = $("#areaName");
	var cityOffset = $("#areaName").offset();
	$("#areatree").css({}).slideDown("fast");
	$("body").bind("mousedown", onBodyDown1);
}
function hideMenu1() {
	$("#areatree").fadeOut("fast");
	$("body").unbind("mousedown", onBodyDown1);
}
function onBodyDown1(event) {
	if (!(event.target.id == "menuBtn" || event.target.id == "areaName" || event.target.id == "menuContent" || $(event.target).parents("#areatree").length>0)) {
		hideMenu1();
	}
}
var setting1 = {
		async : {
			enable : true,
			url : ctp + "/areaController/areaTree.shtml",
			autoParam: ["code=areaCode"]
		},
		data : {
			 simpleData: {
					enable: true
				}
		},
		callback : {
			onClick : zTreeOnClick1,
		}
	};
function zTreeOnClick1(event, treeId, treeNode, clickFlag) {
	$("#areaName").val(treeNode.name);
	$("#areaCode").val(treeNode.code);
	hideMenu1();
}

$(function(){ 
    $.fn.zTree.init($("#areatreeDemo"), setting1); 
    
}); 
